Default Values And Behaviors
When variables are being used in email creatives, it is recommended to use default values to account for any gaps in the data.
For example, when using variables to display the recipients name, but if first name data is not available for every recipient, you may want to fall back on a Title and LastName option for those people.
If you have some Titles missing in your data instead of addressing them by their last name only, you may want to address them simply as ‘Customer’.
Open the New Variable or Edit Variable Screen for the variable to which you wish assign default values:
The Default Values panel is where this information is entered:
The default logic is achieved by using variables.
Default
Enter the default value that will be used for this variable
Behaviors
Click this button, if you wish to set behaviors for the default value based on conditional rules. See the example below
Behaviors work as a waterfall
Use default field when used with list (if present):
Maps the variable read only within Send a Message. Makes visible to the user allows you to make the variable visible or invisible to the recipient.
Always use Default
This option allows you to make the variable visible or hidden to the user.
Example 1
Two variables will need to be created, one called FirstName which will be mapped to the first name column in the data.
The second variable called FirstName_Output is where the behaviour conditions are set.
Enter 'Customer' in Default field and click the icon to open the Behaviors screen:
We want to set Behaviors on the variable so the recipient will be addressed in one of the followings ways in descending order:
- First Name
- Title and Surname
- Customer
If the first option is not available, the second will be used, if this is not available the third will be used.
This is achieved via the Behaviors screen as follows:
Default value is set to 'Customer', this will be used if none of the conditional rules are met.
Conditional Rules
If {FirstName} is not blank, then use the {FirstName}
If {FirstName} is blank and {Title} AND {LastName} are not blank, then use {Title} and {Surname}
Example 2
Send a welcome message to new customers that have opened a bank account with 'Central Bank'. Included in the message will be a credit card offer based on the person's annual salary - customers who earn over $40,000 a year will be offered a Platinum credit card. All other customers will be offered a Gold credit card.
Create a salary variable.
Even though the recipient's salary will not be appearing in the message content, it needs to be added to the creative as a variable, so that it can be used in the conditional logic.
Create the {credit card type} variable.
Click the condition values icon in the variable
The Behaviors window is displayed.
Enter a default value for the variable - a value to be used when none of the criteria you are about to define are met. In our example it will be 'Gold'.
Click in the box next to IF.
Click
to select the salary variable.
Click on the
equal to drop down and select
'greater than'
from the list.
In the next field enter a value of 40000.
In the
Change value to field, enter the value as 'platinum':
Build more complex conditions can be built by incorporating 'and / or' parameters or by adding additional conditions.
In the
Change Value to field you can also enter expression text, for example a variable, a viewlink, and an embed.
The conditional values icon will change color to indicate the field is dependent on conditional logic.
Once the information has been entered and the behaviors set, click the OK button.
|